<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('sysMail')}">邮件列表</a></li>
    </ul>
    <form method="get" action="{:url('sysMail')}">
        <div class="well form-inline margin-top-20">
            邮件标题：<input type="text" class="form-control" name="title" value="{:input('title')}" placeholder="邮件标题">
            邮件内容：<input type="text" class="form-control" name="content" value="{:input('content')}" placeholder="邮件内容">
            <input type="submit" class="btn btn-primary" value="搜索" />
        </div>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <td width="10%">设定时间</td>
                <td width="10%">标题</td>
                <td>内容</td>
                <td width="13%">附件</td>
                <td width="12%">目标玩家</td>
                <td width="12%">管理员</td>
                <td width="12%">发送状态</td>
                <td style="text-align: center" width="6%">操作</td>
            </tr>
            </thead>
            <tbody>
            <volist name="data" id="vo">
                <tr>
                    <td>
                        <empty name="vo['send_time']">即时发送<else/>{$vo.send_time|date='Y-m-d H:i:s'}</empty>
                    </td>
                    <td>{$vo.title}</td>
                    <td>{$vo.content}</td>
                    <td>{$vo.send_item_string|default=""}</td>
                    <td>{$vo.target}</td>
                    <td>{$vo.admin}</td>
                    <td>
                        <eq name="vo['status']" value="0">未发送</eq>
                        <eq name="vo['status']" value="1"><span class="red">发送中</span></eq>
                        <eq name="vo['status']" value="2"><span class="green">已发送</span></eq>
                        [{$vo['send_num']}/{$vo['player_num']}]
                    </td>
                    <td style="text-align: center">
                        <if condition="$vo['status'] == 0">
                            <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('deleteSysMail',array('ids' => $vo['id']))}">删除</a><br/>
                        </if>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<include file="public@footer" />